const express = require('express');
const router = express.Router();
// 1.呈现添加页面的接口
router.get('/addproduct', require('./product-router/addproduct'));
// 2.配置富文本编辑器的上传逻辑
router.post('/uploadimg', require('./product-router/uploadimg'));
// 3.提交商品信息doaddproduct
router.post('/doaddproduct', require('./product-router/doaddproduct'));
// 4. 展示商品的列表页面 /productlist
router.get('/productlist', require('./product-router/productlist'));
// 5.删除商品信息/delproduct
router.post('/delproduct', require('./product-router/delproduct'));
// 6.呈现修改的页面editproduct
router.get('/editproduct', require('./product-router/editproduct'));
// 7.修改商品信息doeditproduct
router.post('/doeditproduct/:id', require('./product-router/doeditproduct'));
// 8.搜索商品的内容/searchproduct
router.get('/searchproduct', require('./product-router/searchproduct'));

// 暴露出去
module.exports = router;